<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="<c:url value="/css/style.css" />" rel="stylesheet"
	type="text/css" media="screen" />
<script src="<c:url value="/js/jquery-1.9.1.min.js" />"></script>
<title>Insert title here</title>

<style type="text/css">
#t1 {
	width: 1200px;
	border-collapse: collapse;
	margin: 20px auto;
}

tr,td,th {
	border: 1px solid #888888;
}

thead {
	border-bottom: 3px double #AA7700;
	background-color: pink;
}

a:link {
	text-decoration: none
}

a:visited {
	color: blue
}

a:hover {
	text-decoration: underline;
	color: blue
}

a:active {
	color: red
}
</style>
<script src="<c:url value="/js/jquery-1.9.1.min.js" />"></script>
<script type="text/javascript">
$(function(){
	$('input[name=deldel]').click(function(e){
		var answer = confirm("確定刪除?");
		
		if (!answer){
			e.preventDefault();
		}
    });
	
})

</script>

</head>
<body>
	<!-- 引入共同的頁首 -->
	<c:set var="funcName" value="IND" scope="session" />
	<jsp:include page="/top/top.jsp" />

	<!-- 從這裡開始寫 -->

	<table id="t1">
		<thead>
			<tr height='36'>
				<th align="center">課程名稱</th>
				<th align="center">講師</th>
				<th align="center">開始日期</th>
				<th align="center">結束日期</th>
				<th align="center">人數</th>
				<th align="center">地點</th>
				<th align="center">費用</th>
				<th align="center">維護</th>
			</tr>

		</thead>


		<c:forEach varStatus="stVar" var="aBookBean" items="${products_DPP}">
			<tr height='36' bgcolor="#FFFFFF" align="left">
				<TD>${aBookBean.cname}</TD>
				<TD>${aBookBean.cteacher}</TD>
				<TD>${aBookBean.cstartdate}</TD>
				<TD>${aBookBean.cenddate}</TD>
				<TD>${aBookBean.cpeople}</TD>
				<TD>${aBookBean.cplace}</TD>
				<TD>${aBookBean.cprice}</TD>
				<TD>
				<form action="<c:url value='/manager/CourseServlet' />">
               	<input type="hidden" name="type" value="DELETE">
               	<input type="hidden" name="cid" value="${aBookBean.cid}">
               	<input type="submit" name="deldel" value="刪除">
               	</form>
					</TD>

			</TR>

		</c:forEach>
	</table>
	<center>
	<a href="<c:url value='/manager/addcourse.jsp' />">
	<input type="button" value="新增課程">
	</a>
	</center>


<!-- 	<a href="javascript:history.back()">上一頁</a> -->
<!-- 	<a href="javascript:history.forward()">下一頁</a> -->

	<!-- 寫到這裡結束 -->
	 <c:if test="${not empty success }">
		<script type="text/javascript">
		$(function() {
			alert("報名成功!!");
		})
		</script>
		</c:if>
		
		
	<div id="footer-wrapper">
		<div id="footer">
			<p>
				Copyright (c) 2010 Sitename.com. All rights reserved. Design by <a
					href="http://www.freecsstemplates.org/" rel="nofollow">FCT</a>.
			</p>
		</div>
	</div>
</body>
</html>